Optimal. Leaf size=71 \[ -\frac {\text {ArcTan}\left (\sqrt {1+\sqrt [3]{-1}} \cot (x)\right )}{3 \sqrt {1+\sqrt [3]{-1}}}-\frac {\text {ArcTan}\left (\sqrt {1-(-1)^{2/3}} \cot (x)\right )}{3 \sqrt {1-(-1)^{2/3}}}-\frac {\cot (x)}{3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 6, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.600, Rules used = {3290, 3260,
209, 3254, 3852, 8} \begin {gather*} -\frac {\text {ArcTan}\left (\sqrt {1+\sqrt [3]{-1}} \cot (x)\right )}{3 \sqrt {1+\sqrt [3]{-1}}}-\frac {\text {ArcTan}\left (\sqrt {1-(-1)^{2/3}} \cot (x)\right )}{3 \sqrt {1-(-1)^{2/3}}}-\frac {\cot (x)}{3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 209
Rule 3254
Rule 3260
Rule 3290
Rule 3852
Rubi steps
\begin {align*} \int \frac {1}{1-\cos ^6(x)} \, dx &=\frac {1}{3} \int \frac {1}{1-\cos ^2(x)} \, dx+\frac {1}{3} \int \frac {1}{1+\sqrt [3]{-1} \cos ^2(x)} \, dx+\frac {1}{3} \int \frac {1}{1-(-1)^{2/3} \cos ^2(x)} \, dx\\ &=\frac {1}{3} \int \csc ^2(x) \, dx-\frac {1}{3} \text {Subst}\left (\int \frac {1}{1+\left (1+\sqrt [3]{-1}\right ) x^2} \, dx,x,\cot (x)\right )-\frac {1}{3} \text {Subst}\left (\int \frac {1}{1+\left (1-(-1)^{2/3}\right ) x^2} \, dx,x,\cot (x)\right )\\ &=-\frac {\tan ^{-1}\left (\sqrt {1+\sqrt [3]{-1}} \cot (x)\right )}{3 \sqrt {1+\sqrt [3]{-1}}}-\frac {\tan ^{-1}\left (\sqrt {1-(-1)^{2/3}} \cot (x)\right )}{3 \sqrt {1-(-1)^{2/3}}}-\frac {1}{3} \text {Subst}(\int 1 \, dx,x,\cot (x))\\ &=-\frac {\tan ^{-1}\left (\sqrt {1+\sqrt [3]{-1}} \cot (x)\right )}{3 \sqrt {1+\sqrt [3]{-1}}}-\frac {\tan ^{-1}\left (\sqrt {1-(-1)^{2/3}} \cot (x)\right )}{3 \sqrt {1-(-1)^{2/3}}}-\frac {\cot (x)}{3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.32, size = 117, normalized size = 1.65 \begin {gather*} \frac {(15+8 \cos (2 x)+\cos (4 x)) \sin (x) \left (6 \cos (x)+i \sqrt [4]{-3} \left (3 i+\sqrt {3}\right ) \text {ArcTan}\left (\frac {1}{2} \sqrt [4]{-\frac {1}{3}} \left (-i+\sqrt {3}\right ) \tan (x)\right ) \sin (x)+\sqrt [4]{-3} \left (-3 i+\sqrt {3}\right ) \text {ArcTan}\left (\frac {(-1)^{3/4} \left (i+\sqrt {3}\right ) \tan (x)}{2 \sqrt [4]{3}}\right ) \sin (x)\right )}{144 \left (-1+\cos ^6(x)\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(170\) vs.
\(2(49)=98\).
time = 0.17, size = 171, normalized size = 2.41
method | result | size |
risch | \(-\frac {2 i}{3 \left ({\mathrm e}^{2 i x}-1\right )}+\left (\munderset {\textit {\_R} =\RootOf \left (3888 \textit {\_Z}^{4}+108 \textit {\_Z}^{2}+1\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{2 i x}+1296 i \textit {\_R}^{3}-216 \textit {\_R}^{2}-1\right )\right )\) | \(51\) |
default | \(-\frac {1}{3 \tan \left (x \right )}+\frac {\sqrt {3}\, \left (\frac {\sqrt {2 \sqrt {3}-3}\, \ln \left (\tan ^{2}\left (x \right )-\tan \left (x \right ) \sqrt {2 \sqrt {3}-3}+\sqrt {3}\right )}{2}+\frac {2 \left (\sqrt {3}+\frac {3}{2}\right ) \arctan \left (\frac {2 \tan \left (x \right )-\sqrt {2 \sqrt {3}-3}}{\sqrt {2 \sqrt {3}+3}}\right )}{\sqrt {2 \sqrt {3}+3}}\right )}{18}-\frac {\sqrt {3}\, \left (\frac {\sqrt {2 \sqrt {3}-3}\, \ln \left (\tan ^{2}\left (x \right )+\tan \left (x \right ) \sqrt {2 \sqrt {3}-3}+\sqrt {3}\right )}{2}+\frac {2 \left (-\sqrt {3}-\frac {3}{2}\right ) \arctan \left (\frac {2 \tan \left (x \right )+\sqrt {2 \sqrt {3}-3}}{\sqrt {2 \sqrt {3}+3}}\right )}{\sqrt {2 \sqrt {3}+3}}\right )}{18}\) | \(171\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 728 vs.
\(2 (66) = 132\).
time = 9.01, size = 728, normalized size = 10.25 \begin {gather*} \frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \left (\operatorname {atan}{\left (\sqrt {2} \cdot \sqrt [4]{3} \tan {\left (\frac {x}{2} \right )} - 1 \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{36} + \frac {\sqrt {2} \cdot \sqrt [4]{3} \left (\operatorname {atan}{\left (\sqrt {2} \cdot \sqrt [4]{3} \tan {\left (\frac {x}{2} \right )} - 1 \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{12} + \frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \left (\operatorname {atan}{\left (\sqrt {2} \cdot \sqrt [4]{3} \tan {\left (\frac {x}{2} \right )} + 1 \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{36} + \frac {\sqrt {2} \cdot \sqrt [4]{3} \left (\operatorname {atan}{\left (\sqrt {2} \cdot \sqrt [4]{3} \tan {\left (\frac {x}{2} \right )} + 1 \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{12} + \frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \left (\operatorname {atan}{\left (\frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \tan {\left (\frac {x}{2} \right )}}{3} - 1 \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{36} + \frac {\sqrt {2} \cdot \sqrt [4]{3} \left (\operatorname {atan}{\left (\frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \tan {\left (\frac {x}{2} \right )}}{3} - 1 \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{12} + \frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \left (\operatorname {atan}{\left (\frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \tan {\left (\frac {x}{2} \right )}}{3} + 1 \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{36} + \frac {\sqrt {2} \cdot \sqrt [4]{3} \left (\operatorname {atan}{\left (\frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \tan {\left (\frac {x}{2} \right )}}{3} + 1 \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{12} - \frac {\sqrt {2} \cdot \sqrt [4]{3} \log {\left (4 \tan ^{2}{\left (\frac {x}{2} \right )} - 4 \sqrt {2} \cdot \sqrt [4]{3} \tan {\left (\frac {x}{2} \right )} + 4 \sqrt {3} \right )}}{24} + \frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \log {\left (4 \tan ^{2}{\left (\frac {x}{2} \right )} - 4 \sqrt {2} \cdot \sqrt [4]{3} \tan {\left (\frac {x}{2} \right )} + 4 \sqrt {3} \right )}}{72} - \frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \log {\left (4 \tan ^{2}{\left (\frac {x}{2} \right )} + 4 \sqrt {2} \cdot \sqrt [4]{3} \tan {\left (\frac {x}{2} \right )} + 4 \sqrt {3} \right )}}{72} + \frac {\sqrt {2} \cdot \sqrt [4]{3} \log {\left (4 \tan ^{2}{\left (\frac {x}{2} \right )} + 4 \sqrt {2} \cdot \sqrt [4]{3} \tan {\left (\frac {x}{2} \right )} + 4 \sqrt {3} \right )}}{24} - \frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \log {\left (36 \tan ^{2}{\left (\frac {x}{2} \right )} - 12 \sqrt {2} \cdot 3^{\frac {3}{4}} \tan {\left (\frac {x}{2} \right )} + 12 \sqrt {3} \right )}}{72} + \frac {\sqrt {2} \cdot \sqrt [4]{3} \log {\left (36 \tan ^{2}{\left (\frac {x}{2} \right )} - 12 \sqrt {2} \cdot 3^{\frac {3}{4}} \tan {\left (\frac {x}{2} \right )} + 12 \sqrt {3} \right )}}{24} - \frac {\sqrt {2} \cdot \sqrt [4]{3} \log {\left (36 \tan ^{2}{\left (\frac {x}{2} \right )} + 12 \sqrt {2} \cdot 3^{\frac {3}{4}} \tan {\left (\frac {x}{2} \right )} + 12 \sqrt {3} \right )}}{24} + \frac {\sqrt {2} \cdot 3^{\frac {3}{4}} \log {\left (36 \tan ^{2}{\left (\frac {x}{2} \right )} + 12 \sqrt {2} \cdot 3^{\frac {3}{4}} \tan {\left (\frac {x}{2} \right )} + 12 \sqrt {3} \right )}}{72} + \frac {\tan {\left (\frac {x}{2} \right )}}{6} - \frac {1}{6 \tan {\left (\frac {x}{2} \right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 199 vs.
\(2 (49) = 98\).
time = 0.49, size = 199, normalized size = 2.80 \begin {gather*} \frac {1}{18} \, {\left (\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor - \arctan \left (-\frac {3^{\frac {3}{4}} {\left (3^{\frac {1}{4}} {\left (\sqrt {6} - \sqrt {2}\right )} + 4 \, \tan \left (x\right )\right )}}{3 \, {\left (\sqrt {6} + \sqrt {2}\right )}}\right )\right )} \sqrt {6 \, \sqrt {3} + 9} + \frac {1}{18} \, {\left (\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor + \arctan \left (-\frac {3^{\frac {3}{4}} {\left (3^{\frac {1}{4}} {\left (\sqrt {6} - \sqrt {2}\right )} - 4 \, \tan \left (x\right )\right )}}{3 \, {\left (\sqrt {6} + \sqrt {2}\right )}}\right )\right )} \sqrt {6 \, \sqrt {3} + 9} - \frac {1}{36} \, \sqrt {6 \, \sqrt {3} - 9} \log \left (\frac {1}{2} \, {\left (\sqrt {6} 3^{\frac {1}{4}} - 3^{\frac {1}{4}} \sqrt {2}\right )} \tan \left (x\right ) + \tan \left (x\right )^{2} + \sqrt {3}\right ) + \frac {1}{36} \, \sqrt {6 \, \sqrt {3} - 9} \log \left (-\frac {1}{2} \, {\left (\sqrt {6} 3^{\frac {1}{4}} - 3^{\frac {1}{4}} \sqrt {2}\right )} \tan \left (x\right ) + \tan \left (x\right )^{2} + \sqrt {3}\right ) - \frac {1}{3 \, \tan \left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.29, size = 95, normalized size = 1.34 \begin {gather*} -\frac {1}{3\,\mathrm {tan}\left (x\right )}+\frac {\sqrt {6}\,\mathrm {atan}\left (\frac {3^{1/4}\,\sqrt {6}\,\mathrm {tan}\left (x\right )\,\left (\frac {1}{27}-\frac {1}{27}{}\mathrm {i}\right )}{-\frac {1}{9}+\frac {\sqrt {3}\,1{}\mathrm {i}}{9}}\right )\,\left (3^{1/4}\,\left (1+1{}\mathrm {i}\right )+3^{3/4}\,\left (-1+1{}\mathrm {i}\right )\right )\,1{}\mathrm {i}}{36}+\frac {\sqrt {6}\,\mathrm {atan}\left (\frac {3^{1/4}\,\sqrt {6}\,\mathrm {tan}\left (x\right )\,\left (\frac {1}{27}+\frac {1}{27}{}\mathrm {i}\right )}{\frac {1}{9}+\frac {\sqrt {3}\,1{}\mathrm {i}}{9}}\right )\,\left (3^{1/4}\,\left (1-\mathrm {i}\right )+3^{3/4}\,\left (-1-\mathrm {i}\right )\right )\,1{}\mathrm {i}}{36} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________